<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Mail::Mailer - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of MailTools - MetaCPAN" href="https://metacpan.org/dist/MailTools/releases.rss" />
        <link rel="canonical" href="./Mail::Mailer.html" />
        <meta name="description" content="Various ancient e-mail related modules" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Mail::Mailer" />
<meta name="twitter:title"       content="Mail::Mailer" />
<meta name="twitter:description" content="" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Mail::Mailer.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of MailTools was released.">
      <span class="relatize">21 May 2019 14:28:18 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/MailTools">MailTools</a>
  </li>
  <li>
    Module version: 2.21
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/MailTools/source/lib/Mail/Mailer.pm">Source</a>
    (<a href="https://metacpan.org/dist/MailTools/source/lib/Mail/Mailer.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g p" href="https://metacpan.org/dist/MailTools/source/lib/Mail/Mailer.pod">Pod Source</a>
    (<a href="https://metacpan.org/dist/MailTools/source/lib/Mail/Mailer.pod?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/MailTools/source/lib/Mail">Browse</a>
    (<a href="https://metacpan.org/dist/MailTools/source/lib/Mail?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/MailTools/changes">Changes</a>
    </li>
    <li>
      <a rel="noopener nofollow" class="nopopup" href="http://perl.overmeer.net/CPAN/">Homepage</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/MailTools/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/markov2/perl5-MailTools">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=MailTools">Issues</a>
      (1)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=MailTools+2.21" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/M/MailTools.html?oncpan=1&amp;distmat=1&amp;version=2.21&amp;grade=2" style="color: #090">8729</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/M/MailTools.html?oncpan=1&amp;distmat=1&amp;version=2.21&amp;grade=3" style="color: #900">3</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/M/MailTools.html?oncpan=1&amp;distmat=1&amp;version=2.21&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/MARKOV/MailTools-2.21">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on MailTools who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 1
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/MailTools-2.21/index.html">44.61% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/MailTools/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/M/MA/MARKOV/MailTools-2.21.tar.gz">
      Download (<span itemprop="fileSize">56.65KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FMARKOV%2FMailTools-2.21%2Flib%2FMail%2FMailer.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/MailTools/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/MailTools/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:MailTools">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="MailTools">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Mail/Mailer.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="MARKOV/MailTools-2.21"
>2.21
  (MARKOV on 2019-05-21)</option>
<option
  
  value="MARKOV/MailTools-2.20"
>2.20
  (MARKOV on 2018-01-23)</option>
<option
  
  value="MARKOV/MailTools-2.19"
>2.19
  (MARKOV on 2017-08-22)</option>
<option
  
  value="MARKOV/MailTools-1.77"
>1.77
  (MARKOV on 2007-05-11)</option>
<optgroup label="BackPAN">'
<option
  
  value="MARKOV/MailTools-2.18"
>2.18
  (MARKOV on 2016-05-18)</option>
<option
  
  value="MARKOV/MailTools-2.17"
>2.17
  (MARKOV on 2016-05-11)</option>
<option
  
  value="MARKOV/MailTools-2.16"
>2.16
  (MARKOV on 2016-04-18)</option>
<option
  
  value="MARKOV/MailTools-2.15"
>2.15
  (MARKOV on 2016-04-18)</option>
<option
  
  value="MARKOV/MailTools-2.14"
>2.14
  (MARKOV on 2014-11-21)</option>
<option
  
  value="MARKOV/MailTools-2.13"
>2.13
  (MARKOV on 2014-01-05)</option>
<option
  
  value="MARKOV/MailTools-2.12"
>2.12
  (MARKOV on 2012-12-21)</option>
<option
  
  value="MARKOV/MailTools-2.11"
>2.11
  (MARKOV on 2012-08-29)</option>
<option
  
  value="MARKOV/MailTools-2.10"
>2.10
  (MARKOV on 2012-08-28)</option>
<option
  
  value="MARKOV/MailTools-2.09"
>2.09
  (MARKOV on 2012-02-25)</option>
<option
  
  value="MARKOV/MailTools-2.08"
>2.08
  (MARKOV on 2011-06-01)</option>
<option
  
  value="MARKOV/MailTools-2.07"
>2.07
  (MARKOV on 2010-10-01)</option>
<option
  
  value="MARKOV/MailTools-2.06"
>2.06
  (MARKOV on 2010-01-26)</option>
<option
  
  value="MARKOV/MailTools-2.05"
>2.05
  (MARKOV on 2009-12-18)</option>
<option
  
  value="MARKOV/MailTools-2.04"
>2.04
  (MARKOV on 2008-07-29)</option>
<option
  
  value="MARKOV/MailTools-2.03"
>2.03
  (MARKOV on 2008-04-14)</option>
<option
  
  value="MARKOV/MailTools-2.02"
>2.02
  (MARKOV on 2007-11-30)</option>
<option
  
  value="MARKOV/MailTools-2.01"
>2.01
  (MARKOV on 2007-11-28)</option>
<option
  
  value="MARKOV/MailTools-2.00_03"
>2.00_03 DEV
  (MARKOV on 2007-09-25)</option>
<option
  
  value="MARKOV/MailTools-2.00_02"
>2.00_02 DEV
  (MARKOV on 2007-07-21)</option>
<option
  
  value="MARKOV/MailTools-2.00_01"
>2.00_01 DEV
  (MARKOV on 2007-06-20)</option>
<option
  
  value="MARKOV/MailTools-1.76"
>1.76
  (MARKOV on 2007-04-10)</option>
<option
  
  value="MARKOV/MailTools-1.74"
>1.74
  (MARKOV on 2006-02-28)</option>
<option
  
  value="MARKOV/MailTools-1.73"
>1.73
  (MARKOV on 2006-01-21)</option>
<option
  
  value="MARKOV/MailTools-1.72"
>1.72
  (MARKOV on 2006-01-17)</option>
<option
  
  value="MARKOV/MailTools-1.71"
>1.71
  (MARKOV on 2006-01-05)</option>
<option
  
  value="MARKOV/MailTools-1.70"
>1.70
  (MARKOV on 2006-01-05)</option>
<option
  
  value="MARKOV/MailTools-1.68"
>1.68
  (MARKOV on 2006-01-05)</option>
<option
  
  value="MARKOV/MailTools-1.67"
>1.67
  (MARKOV on 2005-03-31)</option>
<option
  
  value="MARKOV/MailTools-1.66"
>1.66
  (MARKOV on 2005-01-20)</option>
<option
  
  value="MARKOV/MailTools-1.65"
>1.65
  (MARKOV on 2004-11-24)</option>
<option
  
  value="MARKOV/MailTools-1.64"
>1.64
  (MARKOV on 2004-08-17)</option>
<option
  
  value="MARKOV/MailTools-1.63"
>1.63
  (MARKOV on 2004-08-16)</option>
<option
  
  value="MARKOV/MailTools-1.62"
>1.62
  (MARKOV on 2004-03-24)</option>
<option
  
  value="MARKOV/MailTools-1.61"
>1.61
  (MARKOV on 2004-03-10)</option>
<option
  
  value="MARKOV/MailTools-1.60"
>1.60
  (MARKOV on 2003-09-24)</option>
<option
  
  value="MARKOV/MailTools-1.59"
>1.59
  (MARKOV on 2003-08-13)</option>
<option
  
  value="MARKOV/MailTools-1.58"
>1.58
  (MARKOV on 2003-01-14)</option>
<option
  
  value="MARKOV/MailTools-1.57"
>1.57
  (MARKOV on 2003-01-14)</option>
<option
  
  value="MARKOV/MailTools-1.56"
>1.56
  (MARKOV on 2003-01-06)</option>
<option
  
  value="MARKOV/MailTools-1.55"
>1.55
  (MARKOV on 2003-01-06)</option>
<option
  
  value="MARKOV/MailTools-1.54"
>1.54
  (MARKOV on 2003-01-06)</option>
<option
  
  value="MARKOV/MailTools-1.53"
>1.53
  (MARKOV on 2002-12-09)</option>
<option
  
  value="MARKOV/MailTools-1.52"
>1.52
  (MARKOV on 2002-11-29)</option>
<option
  
  value="MARKOV/MailTools-1.51"
>1.51
  (MARKOV on 2002-10-29)</option>
<option
  
  value="MARKOV/MailTools-1.50"
>1.50
  (MARKOV on 2002-09-03)</option>
<option
  
  value="MARKOV/MailTools-1.49"
>1.49
  (MARKOV on 2002-08-28)</option>
<option
  
  value="MARKOV/MailTools-1.48"
>1.48
  (MARKOV on 2002-08-07)</option>
<option
  
  value="MARKOV/MailTools-1.47"
>1.47
  (MARKOV on 2002-07-05)</option>
<option
  
  value="MARKOV/MailTools-1.46"
>1.46
  (MARKOV on 2002-05-29)</option>
<option
  
  value="MARKOV/MailTools-1.45"
>1.45
  (MARKOV on 2002-05-23)</option>
<option
  
  value="MARKOV/MailTools-1.44"
>1.44
  (MARKOV on 2002-03-23)</option>
<option
  
  value="MARKOV/MailTools-1.43"
>1.43
  (MARKOV on 2002-02-08)</option>
<option
  
  value="MARKOV/MailTools-1.42"
>1.42
  (MARKOV on 2001-12-10)</option>
<option
  
  value="MARKOV/MailTools-1.41"
>1.41
  (MARKOV on 2001-11-14)</option>
<option
  
  value="MARKOV/MailTools-1.40"
>1.40
  (MARKOV on 2001-08-24)</option>
<option
  
  value="MARKOV/MailTools-1.16"
>1.16
  (MARKOV on 2001-08-08)</option>
<option
  
  value="GBARR/MailTools-1.15"
>1.15
  (GBARR on 2000-09-04)</option>
<option
  
  value="GBARR/MailTools-1.1401"
>1.1401
  (GBARR on 2000-04-14)</option>
<option
  
  value="GBARR/MailTools-1.14"
>1.14
  (GBARR on 2000-03-29)</option>
<option
  
  value="GBARR/MailTools-1.13"
>1.13
  (GBARR on 1999-03-31)</option>
<option
  
  value="GBARR/MailTools-1.12"
>1.12
  (GBARR on 1998-09-26)</option>
<option
  
  value="GBARR/MailTools-1.11"
>1.11
  (GBARR on 1998-01-03)</option>
<option
  
  value="GBARR/MailTools-1.1003"
>1.1003
  (GBARR on 1997-11-26)</option>
<option
  
  value="GBARR/MailTools-1.1002"
>1.1002
  (GBARR on 1997-11-18)</option>
<option
  
  value="GBARR/MailTools-1.1001"
>1.1001
  (GBARR on 1997-11-16)</option>
<option
  
  value="GBARR/MailTools-1.10"
>1.10
  (GBARR on 1997-11-13)</option>
<option
  
  value="GBARR/MailTools-1.09"
>1.09
  (GBARR on 1997-02-24)</option>
<option
  
  value="GBARR/MailTools-1.08"
>1.08
  (GBARR on 1997-01-07)</option>
<option
  
  value="GBARR/MailTools-1.07"
>1.07
  (GBARR on 1997-01-02)</option>
<option
  
  value="GBARR/MailTools-1.06"
>1.06
  (GBARR on 1996-08-13)</option>
<option
  
  value="GBARR/MailTools-1.04"
>1.04
  (GBARR on 1995-11-21)</option>
<option
  
  value="GBARR/MailTools-1.03"
>1.03
  (GBARR on 1995-10-21)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/MARKOV/MailTools-2.21/diff/' + encodeURIComponent(this.value) + '/lib/Mail/Mailer.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="MARKOV/MailTools-2.21"
>2.21
  (MARKOV on 2019-05-21)</option>
<option
  
  value="MARKOV/MailTools-2.20"
>2.20
  (MARKOV on 2018-01-23)</option>
<option
  
  value="MARKOV/MailTools-2.19"
>2.19
  (MARKOV on 2017-08-22)</option>
<option
  
  value="MARKOV/MailTools-1.77"
>1.77
  (MARKOV on 2007-05-11)</option>
<optgroup label="BackPAN">'
<option
  
  value="MARKOV/MailTools-2.18"
>2.18
  (MARKOV on 2016-05-18)</option>
<option
  
  value="MARKOV/MailTools-2.17"
>2.17
  (MARKOV on 2016-05-11)</option>
<option
  
  value="MARKOV/MailTools-2.16"
>2.16
  (MARKOV on 2016-04-18)</option>
<option
  
  value="MARKOV/MailTools-2.15"
>2.15
  (MARKOV on 2016-04-18)</option>
<option
  
  value="MARKOV/MailTools-2.14"
>2.14
  (MARKOV on 2014-11-21)</option>
<option
  
  value="MARKOV/MailTools-2.13"
>2.13
  (MARKOV on 2014-01-05)</option>
<option
  
  value="MARKOV/MailTools-2.12"
>2.12
  (MARKOV on 2012-12-21)</option>
<option
  
  value="MARKOV/MailTools-2.11"
>2.11
  (MARKOV on 2012-08-29)</option>
<option
  
  value="MARKOV/MailTools-2.10"
>2.10
  (MARKOV on 2012-08-28)</option>
<option
  
  value="MARKOV/MailTools-2.09"
>2.09
  (MARKOV on 2012-02-25)</option>
<option
  
  value="MARKOV/MailTools-2.08"
>2.08
  (MARKOV on 2011-06-01)</option>
<option
  
  value="MARKOV/MailTools-2.07"
>2.07
  (MARKOV on 2010-10-01)</option>
<option
  
  value="MARKOV/MailTools-2.06"
>2.06
  (MARKOV on 2010-01-26)</option>
<option
  
  value="MARKOV/MailTools-2.05"
>2.05
  (MARKOV on 2009-12-18)</option>
<option
  
  value="MARKOV/MailTools-2.04"
>2.04
  (MARKOV on 2008-07-29)</option>
<option
  
  value="MARKOV/MailTools-2.03"
>2.03
  (MARKOV on 2008-04-14)</option>
<option
  
  value="MARKOV/MailTools-2.02"
>2.02
  (MARKOV on 2007-11-30)</option>
<option
  
  value="MARKOV/MailTools-2.01"
>2.01
  (MARKOV on 2007-11-28)</option>
<option
  
  value="MARKOV/MailTools-2.00_03"
>2.00_03 DEV
  (MARKOV on 2007-09-25)</option>
<option
  
  value="MARKOV/MailTools-2.00_02"
>2.00_02 DEV
  (MARKOV on 2007-07-21)</option>
<option
  
  value="MARKOV/MailTools-2.00_01"
>2.00_01 DEV
  (MARKOV on 2007-06-20)</option>
<option
  
  value="MARKOV/MailTools-1.76"
>1.76
  (MARKOV on 2007-04-10)</option>
<option
  
  value="MARKOV/MailTools-1.74"
>1.74
  (MARKOV on 2006-02-28)</option>
<option
  
  value="MARKOV/MailTools-1.73"
>1.73
  (MARKOV on 2006-01-21)</option>
<option
  
  value="MARKOV/MailTools-1.72"
>1.72
  (MARKOV on 2006-01-17)</option>
<option
  
  value="MARKOV/MailTools-1.71"
>1.71
  (MARKOV on 2006-01-05)</option>
<option
  
  value="MARKOV/MailTools-1.70"
>1.70
  (MARKOV on 2006-01-05)</option>
<option
  
  value="MARKOV/MailTools-1.68"
>1.68
  (MARKOV on 2006-01-05)</option>
<option
  
  value="MARKOV/MailTools-1.67"
>1.67
  (MARKOV on 2005-03-31)</option>
<option
  
  value="MARKOV/MailTools-1.66"
>1.66
  (MARKOV on 2005-01-20)</option>
<option
  
  value="MARKOV/MailTools-1.65"
>1.65
  (MARKOV on 2004-11-24)</option>
<option
  
  value="MARKOV/MailTools-1.64"
>1.64
  (MARKOV on 2004-08-17)</option>
<option
  
  value="MARKOV/MailTools-1.63"
>1.63
  (MARKOV on 2004-08-16)</option>
<option
  
  value="MARKOV/MailTools-1.62"
>1.62
  (MARKOV on 2004-03-24)</option>
<option
  
  value="MARKOV/MailTools-1.61"
>1.61
  (MARKOV on 2004-03-10)</option>
<option
  
  value="MARKOV/MailTools-1.60"
>1.60
  (MARKOV on 2003-09-24)</option>
<option
  
  value="MARKOV/MailTools-1.59"
>1.59
  (MARKOV on 2003-08-13)</option>
<option
  
  value="MARKOV/MailTools-1.58"
>1.58
  (MARKOV on 2003-01-14)</option>
<option
  
  value="MARKOV/MailTools-1.57"
>1.57
  (MARKOV on 2003-01-14)</option>
<option
  
  value="MARKOV/MailTools-1.56"
>1.56
  (MARKOV on 2003-01-06)</option>
<option
  
  value="MARKOV/MailTools-1.55"
>1.55
  (MARKOV on 2003-01-06)</option>
<option
  
  value="MARKOV/MailTools-1.54"
>1.54
  (MARKOV on 2003-01-06)</option>
<option
  
  value="MARKOV/MailTools-1.53"
>1.53
  (MARKOV on 2002-12-09)</option>
<option
  
  value="MARKOV/MailTools-1.52"
>1.52
  (MARKOV on 2002-11-29)</option>
<option
  
  value="MARKOV/MailTools-1.51"
>1.51
  (MARKOV on 2002-10-29)</option>
<option
  
  value="MARKOV/MailTools-1.50"
>1.50
  (MARKOV on 2002-09-03)</option>
<option
  
  value="MARKOV/MailTools-1.49"
>1.49
  (MARKOV on 2002-08-28)</option>
<option
  
  value="MARKOV/MailTools-1.48"
>1.48
  (MARKOV on 2002-08-07)</option>
<option
  
  value="MARKOV/MailTools-1.47"
>1.47
  (MARKOV on 2002-07-05)</option>
<option
  
  value="MARKOV/MailTools-1.46"
>1.46
  (MARKOV on 2002-05-29)</option>
<option
  
  value="MARKOV/MailTools-1.45"
>1.45
  (MARKOV on 2002-05-23)</option>
<option
  
  value="MARKOV/MailTools-1.44"
>1.44
  (MARKOV on 2002-03-23)</option>
<option
  
  value="MARKOV/MailTools-1.43"
>1.43
  (MARKOV on 2002-02-08)</option>
<option
  
  value="MARKOV/MailTools-1.42"
>1.42
  (MARKOV on 2001-12-10)</option>
<option
  
  value="MARKOV/MailTools-1.41"
>1.41
  (MARKOV on 2001-11-14)</option>
<option
  
  value="MARKOV/MailTools-1.40"
>1.40
  (MARKOV on 2001-08-24)</option>
<option
  
  value="MARKOV/MailTools-1.16"
>1.16
  (MARKOV on 2001-08-08)</option>
<option
  
  value="GBARR/MailTools-1.15"
>1.15
  (GBARR on 2000-09-04)</option>
<option
  
  value="GBARR/MailTools-1.1401"
>1.1401
  (GBARR on 2000-04-14)</option>
<option
  
  value="GBARR/MailTools-1.14"
>1.14
  (GBARR on 2000-03-29)</option>
<option
  
  value="GBARR/MailTools-1.13"
>1.13
  (GBARR on 1999-03-31)</option>
<option
  
  value="GBARR/MailTools-1.12"
>1.12
  (GBARR on 1998-09-26)</option>
<option
  
  value="GBARR/MailTools-1.11"
>1.11
  (GBARR on 1998-01-03)</option>
<option
  
  value="GBARR/MailTools-1.1003"
>1.1003
  (GBARR on 1997-11-26)</option>
<option
  
  value="GBARR/MailTools-1.1002"
>1.1002
  (GBARR on 1997-11-18)</option>
<option
  
  value="GBARR/MailTools-1.1001"
>1.1001
  (GBARR on 1997-11-16)</option>
<option
  
  value="GBARR/MailTools-1.10"
>1.10
  (GBARR on 1997-11-13)</option>
<option
  
  value="GBARR/MailTools-1.09"
>1.09
  (GBARR on 1997-02-24)</option>
<option
  
  value="GBARR/MailTools-1.08"
>1.08
  (GBARR on 1997-01-07)</option>
<option
  
  value="GBARR/MailTools-1.07"
>1.07
  (GBARR on 1997-01-02)</option>
<option
  
  value="GBARR/MailTools-1.06"
>1.06
  (GBARR on 1996-08-13)</option>
<option
  
  value="GBARR/MailTools-1.04"
>1.04
  (GBARR on 1995-11-21)</option>
<option
  
  value="GBARR/MailTools-1.03"
>1.03
  (GBARR on 1995-10-21)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Date::Format" title="Date::Format" class="ellipsis">Date::Format</a></li>
  <li><a href="./Date::Parse.html" title="Date::Parse" class="ellipsis">Date::Parse</a></li>
  <li><a href="https://metacpan.org/pod/IO::Handle" title="IO::Handle" class="ellipsis">IO::Handle</a></li>
  <li><a href="https://metacpan.org/pod/Net::Domain" title="Net::Domain" class="ellipsis">Net::Domain</a></li>
  <li><a href="https://metacpan.org/pod/Net::SMTP" title="Net::SMTP" class="ellipsis">Net::SMTP</a></li>
  <li><a href="https://metacpan.org/pod/Test::More" title="Test::More" class="ellipsis">Test::More</a></li>
  <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Mail::Mailer/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Mail%3A%3AMailer">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=MailTools">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/MARKOV/MailTools-2.21/view/lib/Mail/Mailer.pm">This version</a>
    </li>
    <li>
      <a href="./Mail::Mailer.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/RWP"><img src="https://www.gravatar.com/avatar/7110eb2389e69a066d9d7cad7a1cc2bf?d=identicon&amp;s=20" title="RWP" alt="RWP"></a>
<a class="display-all" href="https://metacpan.org/author/PWBENNETT"><img src="https://www.gravatar.com/avatar/41a085cce4a7061cf4ee49d02b9bed0e?d=identicon&amp;s=20" title="PWBENNETT" alt="PWBENNETT"></a>
<a class="display-all" href="https://metacpan.org/author/MICHIELB"><img src="https://www.gravatar.com/avatar/c35b97da3835376f2d804b022121f962?d=identicon&amp;s=20" title="MICHIELB" alt="MICHIELB"></a>
<a class="display-all" href="https://metacpan.org/author/PINGAN"><img src="https://www.gravatar.com/avatar/a02222e5e0e4fd24d52fc29a08ac6bcb?d=identicon&amp;s=20" title="PINGAN" alt="PINGAN"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/MailTools/plussers">4 PAUSE users</a>
</div>
<div>
    5 non-PAUSE users
</div>
</div>
    </li>
    <li>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/MARKOV" class="author-name">Mark Overmeer</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Mail/Mailer.pm&#39;" class="">
<option
  selected
  value="MARKOV/MailTools-2.21"
>2.21
  (MARKOV on 2019-05-21)</option>
<option
  
  value="MARKOV/MailTools-2.20"
>2.20
  (MARKOV on 2018-01-23)</option>
<option
  
  value="MARKOV/MailTools-2.19"
>2.19
  (MARKOV on 2017-08-22)</option>
<option
  
  value="MARKOV/MailTools-1.77"
>1.77
  (MARKOV on 2007-05-11)</option>
<optgroup label="BackPAN">'
<option
  
  value="MARKOV/MailTools-2.18"
>2.18
  (MARKOV on 2016-05-18)</option>
<option
  
  value="MARKOV/MailTools-2.17"
>2.17
  (MARKOV on 2016-05-11)</option>
<option
  
  value="MARKOV/MailTools-2.16"
>2.16
  (MARKOV on 2016-04-18)</option>
<option
  
  value="MARKOV/MailTools-2.15"
>2.15
  (MARKOV on 2016-04-18)</option>
<option
  
  value="MARKOV/MailTools-2.14"
>2.14
  (MARKOV on 2014-11-21)</option>
<option
  
  value="MARKOV/MailTools-2.13"
>2.13
  (MARKOV on 2014-01-05)</option>
<option
  
  value="MARKOV/MailTools-2.12"
>2.12
  (MARKOV on 2012-12-21)</option>
<option
  
  value="MARKOV/MailTools-2.11"
>2.11
  (MARKOV on 2012-08-29)</option>
<option
  
  value="MARKOV/MailTools-2.10"
>2.10
  (MARKOV on 2012-08-28)</option>
<option
  
  value="MARKOV/MailTools-2.09"
>2.09
  (MARKOV on 2012-02-25)</option>
<option
  
  value="MARKOV/MailTools-2.08"
>2.08
  (MARKOV on 2011-06-01)</option>
<option
  
  value="MARKOV/MailTools-2.07"
>2.07
  (MARKOV on 2010-10-01)</option>
<option
  
  value="MARKOV/MailTools-2.06"
>2.06
  (MARKOV on 2010-01-26)</option>
<option
  
  value="MARKOV/MailTools-2.05"
>2.05
  (MARKOV on 2009-12-18)</option>
<option
  
  value="MARKOV/MailTools-2.04"
>2.04
  (MARKOV on 2008-07-29)</option>
<option
  
  value="MARKOV/MailTools-2.03"
>2.03
  (MARKOV on 2008-04-14)</option>
<option
  
  value="MARKOV/MailTools-2.02"
>2.02
  (MARKOV on 2007-11-30)</option>
<option
  
  value="MARKOV/MailTools-2.01"
>2.01
  (MARKOV on 2007-11-28)</option>
<option
  
  value="MARKOV/MailTools-2.00_03"
>2.00_03 DEV
  (MARKOV on 2007-09-25)</option>
<option
  
  value="MARKOV/MailTools-2.00_02"
>2.00_02 DEV
  (MARKOV on 2007-07-21)</option>
<option
  
  value="MARKOV/MailTools-2.00_01"
>2.00_01 DEV
  (MARKOV on 2007-06-20)</option>
<option
  
  value="MARKOV/MailTools-1.76"
>1.76
  (MARKOV on 2007-04-10)</option>
<option
  
  value="MARKOV/MailTools-1.74"
>1.74
  (MARKOV on 2006-02-28)</option>
<option
  
  value="MARKOV/MailTools-1.73"
>1.73
  (MARKOV on 2006-01-21)</option>
<option
  
  value="MARKOV/MailTools-1.72"
>1.72
  (MARKOV on 2006-01-17)</option>
<option
  
  value="MARKOV/MailTools-1.71"
>1.71
  (MARKOV on 2006-01-05)</option>
<option
  
  value="MARKOV/MailTools-1.70"
>1.70
  (MARKOV on 2006-01-05)</option>
<option
  
  value="MARKOV/MailTools-1.68"
>1.68
  (MARKOV on 2006-01-05)</option>
<option
  
  value="MARKOV/MailTools-1.67"
>1.67
  (MARKOV on 2005-03-31)</option>
<option
  
  value="MARKOV/MailTools-1.66"
>1.66
  (MARKOV on 2005-01-20)</option>
<option
  
  value="MARKOV/MailTools-1.65"
>1.65
  (MARKOV on 2004-11-24)</option>
<option
  
  value="MARKOV/MailTools-1.64"
>1.64
  (MARKOV on 2004-08-17)</option>
<option
  
  value="MARKOV/MailTools-1.63"
>1.63
  (MARKOV on 2004-08-16)</option>
<option
  
  value="MARKOV/MailTools-1.62"
>1.62
  (MARKOV on 2004-03-24)</option>
<option
  
  value="MARKOV/MailTools-1.61"
>1.61
  (MARKOV on 2004-03-10)</option>
<option
  
  value="MARKOV/MailTools-1.60"
>1.60
  (MARKOV on 2003-09-24)</option>
<option
  
  value="MARKOV/MailTools-1.59"
>1.59
  (MARKOV on 2003-08-13)</option>
<option
  
  value="MARKOV/MailTools-1.58"
>1.58
  (MARKOV on 2003-01-14)</option>
<option
  
  value="MARKOV/MailTools-1.57"
>1.57
  (MARKOV on 2003-01-14)</option>
<option
  
  value="MARKOV/MailTools-1.56"
>1.56
  (MARKOV on 2003-01-06)</option>
<option
  
  value="MARKOV/MailTools-1.55"
>1.55
  (MARKOV on 2003-01-06)</option>
<option
  
  value="MARKOV/MailTools-1.54"
>1.54
  (MARKOV on 2003-01-06)</option>
<option
  
  value="MARKOV/MailTools-1.53"
>1.53
  (MARKOV on 2002-12-09)</option>
<option
  
  value="MARKOV/MailTools-1.52"
>1.52
  (MARKOV on 2002-11-29)</option>
<option
  
  value="MARKOV/MailTools-1.51"
>1.51
  (MARKOV on 2002-10-29)</option>
<option
  
  value="MARKOV/MailTools-1.50"
>1.50
  (MARKOV on 2002-09-03)</option>
<option
  
  value="MARKOV/MailTools-1.49"
>1.49
  (MARKOV on 2002-08-28)</option>
<option
  
  value="MARKOV/MailTools-1.48"
>1.48
  (MARKOV on 2002-08-07)</option>
<option
  
  value="MARKOV/MailTools-1.47"
>1.47
  (MARKOV on 2002-07-05)</option>
<option
  
  value="MARKOV/MailTools-1.46"
>1.46
  (MARKOV on 2002-05-29)</option>
<option
  
  value="MARKOV/MailTools-1.45"
>1.45
  (MARKOV on 2002-05-23)</option>
<option
  
  value="MARKOV/MailTools-1.44"
>1.44
  (MARKOV on 2002-03-23)</option>
<option
  
  value="MARKOV/MailTools-1.43"
>1.43
  (MARKOV on 2002-02-08)</option>
<option
  
  value="MARKOV/MailTools-1.42"
>1.42
  (MARKOV on 2001-12-10)</option>
<option
  
  value="MARKOV/MailTools-1.41"
>1.41
  (MARKOV on 2001-11-14)</option>
<option
  
  value="MARKOV/MailTools-1.40"
>1.40
  (MARKOV on 2001-08-24)</option>
<option
  
  value="MARKOV/MailTools-1.16"
>1.16
  (MARKOV on 2001-08-08)</option>
<option
  
  value="GBARR/MailTools-1.15"
>1.15
  (GBARR on 2000-09-04)</option>
<option
  
  value="GBARR/MailTools-1.1401"
>1.1401
  (GBARR on 2000-04-14)</option>
<option
  
  value="GBARR/MailTools-1.14"
>1.14
  (GBARR on 2000-03-29)</option>
<option
  
  value="GBARR/MailTools-1.13"
>1.13
  (GBARR on 1999-03-31)</option>
<option
  
  value="GBARR/MailTools-1.12"
>1.12
  (GBARR on 1998-09-26)</option>
<option
  
  value="GBARR/MailTools-1.11"
>1.11
  (GBARR on 1998-01-03)</option>
<option
  
  value="GBARR/MailTools-1.1003"
>1.1003
  (GBARR on 1997-11-26)</option>
<option
  
  value="GBARR/MailTools-1.1002"
>1.1002
  (GBARR on 1997-11-18)</option>
<option
  
  value="GBARR/MailTools-1.1001"
>1.1001
  (GBARR on 1997-11-16)</option>
<option
  
  value="GBARR/MailTools-1.10"
>1.10
  (GBARR on 1997-11-13)</option>
<option
  
  value="GBARR/MailTools-1.09"
>1.09
  (GBARR on 1997-02-24)</option>
<option
  
  value="GBARR/MailTools-1.08"
>1.08
  (GBARR on 1997-01-07)</option>
<option
  
  value="GBARR/MailTools-1.07"
>1.07
  (GBARR on 1997-01-02)</option>
<option
  
  value="GBARR/MailTools-1.06"
>1.06
  (GBARR on 1996-08-13)</option>
<option
  
  value="GBARR/MailTools-1.04"
>1.04
  (GBARR on 1995-11-21)</option>
<option
  
  value="GBARR/MailTools-1.03"
>1.03
  (GBARR on 1995-10-21)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/MailTools">MailTools-2.21</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage three &#10;
          • 51 direct dependents &#10;          • 484 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="MailTools-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="MailTools-2.21">
    <input type="hidden" name="author" value="MARKOV">
    <input type="hidden" name="distribution" value="MailTools">
    <button type="submit" class="favorite highlight"><span>9</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Mail::Mailer.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>9</span> ++</a>
</div>
   / <span>Mail::Mailer</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Mail::Mailer.html#NAME">NAME</a></li>
  <li><a href="./Mail::Mailer.html#INHERITANCE">INHERITANCE</a></li>
  <li><a href="./Mail::Mailer.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./Mail::Mailer.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./Mail::Mailer.html#METHODS">METHODS</a>
    <ul>
      <li><a href="./Mail::Mailer.html#Constructors">Constructors</a></li>
    </ul>
  </li>
  <li><a href="./Mail::Mailer.html#DETAILS">DETAILS</a>
    <ul>
      <li><a href="./Mail::Mailer.html#ENVIRONMENT-VARIABLES">ENVIRONMENT VARIABLES</a></li>
      <li><a href="./Mail::Mailer.html#BUGS">BUGS</a></li>
    </ul>
  </li>
  <li><a href="./Mail::Mailer.html#SEE-ALSO">SEE ALSO</a></li>
  <li><a href="./Mail::Mailer.html#AUTHORS">AUTHORS</a></li>
  <li><a href="./Mail::Mailer.html#LICENSE">LICENSE</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Mail::Mailer - send simple emails</p>

<h1 id="INHERITANCE">INHERITANCE</h1>

<pre><code> Mail::Mailer
   is an IO::Handle</code></pre>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code>  use Mail::Mailer;
  use Mail::Mailer qw(mail);    # specifies default mailer

  $mailer = Mail::Mailer-&gt;new;
  $mailer = Mail::Mailer-&gt;new($type, @args);

  $mailer-&gt;open(\%headers);
  print $mailer $body;
  $mailer-&gt;close
      or die &quot;couldn&#39;t send whole message: $!\n&quot;;</code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>Sends mail using any of the built-in methods. As TYPE argument to <a href="https://metacpan.org/pod/distribution/MailTools/lib/Mail/Mailer.pod#Constructors">new()</a>, you can specify any of</p>

<dl>

<dt id="sendmail"><code>sendmail</code></dt>
<dd>

<p>Use the <code>sendmail</code> program to deliver the mail.</p>

</dd>
<dt id="smtp"><code>smtp</code></dt>
<dd>

<p>Use the <code>smtp</code> protocol via Net::SMTP to deliver the mail. The server to use can be specified in <code>@args</code> with</p>

<pre><code> $mailer = Mail::Mailer-&gt;new(&#39;smtp&#39;, Server =&gt; $server);</code></pre>

<p>The smtp mailer does not handle <code>Cc</code> and <code>Bcc</code> lines, neither their <code>Resent-*</code> fellows. The <code>Debug</code> options enables debugging output from <code>Net::SMTP</code>.</p>

<p>[added 2.21] You may also use the <code>StartTLS =&gt; 1</code> options to upgrade the connection with STARTTLS. You need <code>libnet</code> version 1.28 (2014) for this to work.</p>

<p>You may also use the <code>Auth =&gt; [ $user, $password ]</code> option for SASL authentication. To make this work, you have to install the <a href="https://metacpan.org/pod/Authen::SASL">Authen::SASL</a> distribution yourself: it is not automatically installed.</p>

</dd>
<dt id="smtps"><code>smtps</code></dt>
<dd>

<p>This option is <b>deprecated</b> when you have <code>libnet</code> 1.28 (2014) and above.</p>

<p>Use the smtp over ssl protocol via <a href="https://metacpan.org/pod/Net::SMTP::SSL">Net::SMTP::SSL</a> to deliver the mail. Usage is identical to <code>smtp</code>. You have to install Authen::SASL as well.</p>

<pre><code> $mailer = Mail::Mailer-&gt;new(&#39;smtps&#39;, Server =&gt; $server);</code></pre>

</dd>
<dt id="qmail"><code>qmail</code></dt>
<dd>

<p>Use qmail&#39;s qmail-inject program to deliver the mail.</p>

</dd>
<dt id="testfile"><code>testfile</code></dt>
<dd>

<p>Used for debugging, this displays the data to the file named in <code>$Mail::Mailer::testfile::config{outfile}</code> which defaults to a file named <code>mailer.testfile</code>. No mail is ever sent.</p>

</dd>
</dl>

<p><code>Mail::Mailer</code> will search for executables in the above order. The default mailer will be the first one found.</p>

<h1 id="METHODS">METHODS</h1>

<h2 id="Constructors">Constructors</h2>

<dl>

<dt id="Mail::Mailer-&gt;new($type,-%options)"><a id="Mail"></a><a id="Mail::Mailer--new-type---options"></a>Mail::Mailer-&gt;<b>new</b>($type, %options)</dt>
<dd>

<p>The $type is one of the back-end sender implementations, as described in the DESCRIPTION chapter of this manual page. The %options are passed to that back-end.</p>

</dd>
<dt id="$obj-&gt;open(HASH)"><a id="obj--open-HASH"></a>$obj-&gt;<b>open</b>(HASH)</dt>
<dd>

<p>The HASH consists of key and value pairs, the key being the name of the header field (eg, <code>To</code>), and the value being the corresponding contents of the header field. The value can either be a scalar (eg, <code>gnat@frii.com</code>) or a reference to an array of scalars (<code>eg, [&#39;gnat@frii.com&#39;, &#39;Tim.Bunce@ig.co.uk&#39;]</code>).</p>

</dd>
</dl>

<h1 id="DETAILS">DETAILS</h1>

<h2 id="ENVIRONMENT-VARIABLES"><a id="ENVIRONMENT"></a>ENVIRONMENT VARIABLES</h2>

<dl>

<dt id="PERL_MAILERS">PERL_MAILERS</dt>
<dd>

<p>Augments/override the build in choice for binary used to send out our mail messages.</p>

<p>Format:</p>

<pre><code>    &quot;type1:mailbinary1;mailbinary2;...:type2:mailbinaryX;...:...&quot;</code></pre>

<p>Example: assume you want you use private sendmail binary instead of mailx, one could set <code>PERL_MAILERS</code> to:</p>

<pre><code>    &quot;mail:/does/not/exists:sendmail:$HOME/test/bin/sendmail&quot;</code></pre>

<p>On systems which may include <code>:</code> in file names, use <code>|</code> as separator between type-groups.</p>

<pre><code>    &quot;mail:c:/does/not/exists|sendmail:$HOME/test/bin/sendmail&quot;</code></pre>

</dd>
</dl>

<h2 id="BUGS">BUGS</h2>

<p>Mail::Mailer does not help with folding, and does not protect against various web-script hacker attacks, for instance where a new-line is inserted in the content of the field.</p>

<h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1>

<p>This module is part of the MailTools distribution, <i>http://perl.overmeer.net/mailtools/</i>.</p>

<h1 id="AUTHORS">AUTHORS</h1>

<p>The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.</p>

<p>Mail::Cap by Gisle Aas &lt;aas@oslonett.no&gt;. Mail::Field::AddrList by Peter Orbaek &lt;poe@cit.dk&gt;. Mail::Mailer and Mail::Send by Tim Bunce &lt;Tim.Bunce@ig.co.uk&gt;. For other contributors see ChangeLog.</p>

<h1 id="LICENSE">LICENSE</h1>

<p>Copyrights 1995-2000 Graham Barr &lt;gbarr@pobox.com&gt; and 2001-2017 Mark Overmeer &lt;perl@overmeer.net&gt;.</p>

<p>This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <i>http://www.perl.com/perl/misc/Artistic.html</i></p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install MailTools, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm MailTools</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install MailTools</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Mail::Mailer.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
